tools/oxenstored: validate config file before live update
authorEdwin Török <edvin.torok@citrix.com>
Tue, 11 May 2021 15:56:50 +0000 (15:56 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 9 Feb 2023 15:55:25 +0000 (15:55 +0000)
commite74d868b48d55dfb20f5a41ec20fbec93d8e5deb
tree4831ed6525a5eb86d10670d14a908f617adea058
parentf0e653fb4aea77210b8096c170e82de3c2039d89
tools/oxenstored: validate config file before live update

The configuration file can contain typos or various errors that could prevent
live update from succeeding (e.g. a flag only valid on a different version).
Unknown entries in the config file would be ignored on startup normally,
add a strict --config-test that live-update can use to check that the config file
is valid *for the new binary*.

For compatibility with running old code during live update recognize
--live --help as an equivalent to --config-test.

Signed-off-by: Edwin Török <edvin.torok@citrix.com>
Acked-by: Christian Lindig <christian.lindig@citrix.com>
(cherry picked from commit e6f07052ce4a0f0b7d4dc522d87465efb2d9ee86)
tools/ocaml/xenstored/parse_arg.ml
tools/ocaml/xenstored/xenstored.ml